const seq = require('sequelize')
const time = require('../time')

module.exports = {
  NAME: 'chat_new_friends',
  TABLE: {
    from: {
      type: seq.INTEGER(11),
      comment: '发送用户的 id',
      field: 'from',
      required: true,
    },
    to: {
      type: seq.INTEGER(11),
      comment: '接收用户的 id',
      field: 'to',
      required: true,
    },
    content: {
      type: seq.TEXT,
      comment: '内容',
      field: 'content', //  相应的字段名称
    },
    status: {
      type: seq.INTEGER(1),
      defaultValue: 0,
      comment: '是否同意',
      field: 'status'
    },
    read: {
      type: seq.INTEGER(1),
      defaultValue: 0,
      comment: '标识是否已读',
      field: 'read'
    },
    ...time.create_date,
    ...time.update_date,
    ...time.delete_date,
    ...time.create_by,
    ...time.update_by,
    ...time.delete_by
  },
}
